package cn.yj.common.entity;

import cn.yj.common.emums.PayType;

import java.io.Serializable;

/**
 * @author 永健
 * @since 2022-02-19 17:23
 */
public class PayOrder implements Serializable {

    /**
     * 商户订单编号
     */
    private String outTradeNo;

    /**
     * 支付宝订单还是微信订单
     */
    private PayType payType;

    private String errMsg;

    public PayOrder() {
    }

    public PayOrder(PayType payType,String outTradeNo) {
        this.outTradeNo = outTradeNo;
        this.payType = payType;
    }

    /**
     * 当前订单状态：微信与支付宝的两个值不同
     */
    private String tradeStatus;

    /**
     * success 值为true的时候，就是成功。判断此值即可
     */
    private  boolean success;

    public boolean isSuccess() {
        return success;
    }

    public PayOrder setSuccess(boolean success) {
        this.success = success;
        return this;
    }

    public String getOutTradeNo() {
        return outTradeNo;
    }

    public PayOrder setOutTradeNo(String outTradeNo) {
        this.outTradeNo = outTradeNo;
        return this;
    }

    public PayType getPayType() {
        return payType;
    }

    public PayOrder setPayType(PayType payType) {
        this.payType = payType;
        return this;
    }

    public String getTradeStatus() {
        return tradeStatus;
    }

    public PayOrder setTradeStatus(String tradeStatus) {
        this.tradeStatus = tradeStatus;
        return this;
    }

    public String getErrMsg() {
        return errMsg;
    }

    public PayOrder setErrMsg(String errMsg) {
        this.errMsg = errMsg;
        return this;
    }
}
